<?php $recipients = myuser_helper::getUserRecipients(); ?>

	<div id = "sidebar-area">
		<div id = "sidebar-menu">
			<ul class = "message_menu">
				<h2>Messages</h2>
				<?php
					$typefromurl = strtolower($this->uri->segment(3));
				?>
				<li class="<?php echo ($typefromurl == 'photos')? 'current':'';?>"><a href = "<?php echo base_url();?>messages/type/photos"><span id = "c-photos"><span class="c-counter"><?php echo myuser_helper::countMsg('photos');?></span></span>Photos</a></li>
				<li class="<?php echo ($typefromurl == 'videos')? 'current':'';?>"><a href = "<?php echo base_url();?>messages/type/videos"><span id = "c-videos"><span class="c-counter"><?php echo myuser_helper::countMsg('videos');?></span></span>Videos</a></li>
				<li class="<?php echo ($typefromurl == 'notes')? 'current':'';?>"><a href = "<?php echo base_url();?>messages/type/notes"><span id = "c-notes"><span class="c-counter"><?php echo myuser_helper::countMsg('notes');?></span></span>Notes</a></li>
				<li class="<?php echo ($typefromurl == 'documents')? 'current':'';?>"><a href = "<?php echo base_url();?>messages/type/documents"><span id = "c-documents"><span class="c-counter"><?php echo myuser_helper::countMsg('documents');?></span></span>Documents</a></li>
				<li class="<?php echo ($typefromurl == 'journal')? 'current':'';?>"><a href = "<?php echo base_url();?>messages/type/journal"><span id = "c-journal"><span class="c-counter"><?php echo myuser_helper::countMsg('journal');?></span></span>Journal</a></li>
			</ul>
			<ul class = "recepients_menu">
				<div class="fright">
					<div class="fleft"><a href="<?php echo base_url();?>recipients" id="a_recipients"><h2>Recipients</h2></a></div>
					<div id="rep_counter" class="fleft"><?php echo count($recipients);?></div>
				</div>
				<input type="hidden" id="inp_rcounter" name="inp_rcounter" value="<?php echo count($recipients);?>" />
				<div class="clear"></div>
				<li class="<?php echo (strtolower($this->uri->segment(2)) == 'add_recipients')? 'current':'';?>"><a href="<?php echo base_url();?>recipients/add_recipients">Add recipients</a></li>
				<li class="<?php echo (strtolower($this->uri->segment(2)) == 'remembrance_wall')? 'current':'';?>"><a href="<?php echo base_url();?>profile/remembrance_wall">Remembrance Wall</a></li>
			</ul>
		</div>
	</div>
</div><!--end of sideright-->
